package com.pathpad.hibernate;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

@Entity
@Table(name = "ppuser")
public class PPUser implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6591657806466566798L;

	// @Id
	// @GeneratedValue(strategy = GenerationType.AUTO)
	// @Column(name = "Id", nullable = false)
	// private Long id;

	@Id
	@Column(name = "UserId", nullable = false)
	private java.lang.String userId;

	@Column(name = "Email", nullable = false)
	private java.lang.String email;

	@Column(name = "Password", nullable = false)
	private java.lang.String password;

	@Column(name = "Memo")
	private java.lang.String memo;

	@OneToMany(fetch = FetchType.LAZY)
	private Set<PPUserCommonPad> ppUserCommonPad = new HashSet<PPUserCommonPad>(
			0);

	@Version
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TIMESTAMP", length = 23)
	private Date timestamp;

	public PPUser(String userId, String email, String password, String memo) {
		this.userId = userId;
		this.email = email;
		this.password = password;
		this.memo = memo;
	}

	public PPUser() {
		super();
		// TODO Auto-generated constructor stub
	}

	// public Long getId() {
	// return id;
	// }
	//
	// public void setId(Long id) {
	// this.id = id;
	// }

	public java.lang.String getUserId() {
		return userId;
	}

	public void setUserId(java.lang.String userId) {
		this.userId = userId;
	}

	public java.lang.String getEmail() {
		return email;
	}

	public void setEmail(java.lang.String email) {
		this.email = email;
	}

	public java.lang.String getPassword() {
		return password;
	}

	public void setPassword(java.lang.String password) {
		this.password = password;
	}

	public java.lang.String getMemo() {
		return memo;
	}

	public void setMemo(java.lang.String memo) {
		this.memo = memo;
	}

	public Set<PPUserCommonPad> getPpUserCommonPad() {
		return ppUserCommonPad;
	}

	public void setPpUserCommonPad(Set<PPUserCommonPad> ppUserCommonPad) {
		this.ppUserCommonPad = ppUserCommonPad;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

}
